const login = (axios, Url) => {
  var Object = {}
  /* p1:redirectUri=》登录页面的链接; 
   * p2:phone=》用户手机号码;
   * p3:password=》用户密码;
   * p4:sid =》 学校的sid*/
  Object.Select = () => {
    return axios({
      method: 'POST',
      url: Url.Select,
      data: {}
    })
  },
  Object.Login = (phone, pwd, uri, sid) => {
      return axios({
        method: 'POST',
        url: Url.Login,
        data: {
          'redirectUri': uri,
          'phone': phone,
          'password': pwd,
          'sid': sid
        }
      })
    },
    /* p1:verify=》手机验证码;
     * p2:phone=》用户手机号码;
     * p3:password=》更新的密码;*/
    Object.Update = (verify, phone, pwd, sid) => {
      return axios({
        method: 'POST',
        url: Url.UpdatePwd,
        data: {
          verify: verify,
          phone: phone,
          password: pwd,
          sid: sid
        }
      })
    },
    Object.VerifyCode = (phone) => {
      return axios({
        method: 'POST',
        url: Url.VerifyCode,
        data: {
          phone: phone
        }
      })
    }

  return Object
}
export default login
